Repository navigation
Conversation
The checkable half of a rite's promise, beside DECLARE INTENT's prose. Clauses are declarations in a rite body, gathered by the parser into the rite's contract in written order; they never execute as steps. REQUIRE is weighed at entry (parameters bound, body not yet run), ENSURE at exit (the rite's frame, after RETURN too), NEVER at both thresholds. A broken clause fails the run with ContractError (CONTRACT_ERROR), naming the rite, the clause, and the values weighed; the run report gains an additive contracts array. A contract-failed invocation's intent record is marked unaligned. Sandbox behaviour is identical; clause words are English in every tongue for now. Spec: SX-40 to SX-45 in the syntax layer, the three words join LX-7. Docs: LANGUAGE_REFERENCE section 9, machine-interfaces, AGENTS.md, CHANGELOG. Examples: intent_demo gains a baking rite whose clauses hold; the math scroll's FACTORIAL swears REQUIRE n >= 0. Playground bundle rebuilt. 27 new tests in tests/test_intent_contracts.py.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
koketso2017
approved these changes
Nov 17, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build 3 of the 90-day plan: the checkable half of a rite's promise, beside
DECLARE INTENT's prose. The founder gave the green light for the three keywords on 2026-11-17.What lands
REQUIRE/ENSURE/NEVERwritten as lines of a rite body are lifted out by the parser into the rite's contract, in written order. They never execute as steps, and one written after aRETURNbinds exactly as one written before it. A clause outside a rite body, or nested in a branch, is a gentle parse error.ContractError(machine codeCONTRACT_ERROR), naming the rite, the clause as written, and the values it was weighed against. The invocation's intent record is markedaligned: false.TRY/CATCHat a call site may shelter it, as any runtime failure.run --json,run --sandbox --json, the playground payload, the bridge run tool) gain acontractsarray:{rite, kind, text, passed}, one entry per weighing. The dated run schema gains the field additively; required fields are untouched. Sandbox behaviour is identical.examples/intent_demo.godgains a baking rite whose clauses all hold; themathscroll'sFACTORIALnow swearsREQUIRE n >= 0.Proof (real engine)
bake(0)withREQUIRE loaves > 0: ok:false, exit 1,CONTRACT_ERROR, output empty (the body never revealed), contracts array holds the failed REQUIRE.bake(5): passes; contracts array shows REQUIRE, NEVER (entry), ENSURE, NEVER (exit), all passed.ENSURE loaves IS 5) and NEVER failure (lend(5)againstNEVER debt > 0) each fail the run with the covenant message and the values named.Tests
1093 passed (baseline 1066, plus 27 new in
tests/test_intent_contracts.py). Examples parity checked against main: the same five grant-needing examples fail a bare sandbox run on both.Notes for review
loud-errors-2026-11): both touchgodcode/interpreter.pyaround_call_riteand statement dispatch, plusAGENTS.md,CHANGELOG.md, and the playground bundle. This branch builds independently from main; the overlap is flagged, not resolved.